package com.lo9ic.research.nest;

import java.util.HashMap;

public class Shared {

	public HashMap<String, SharedData> shareds = new HashMap<String, SharedData>();
	public Shared () {}
	
	public SharedData getShared(String sharedId) {
		return shareds.get(sharedId);
	}

	public SharedData createShared(String key) {
		SharedData shared = new SharedData();
		setShared(key, shared);
		return shared;
	}
	
	public void setShared(String key, SharedData shared) {
		shareds.put(key, shared);
	}
	
	public String[] getSharedIds () {
		String[] a = new String[]{};
		return shareds.keySet().toArray(a);
	}
	
	
}
